package com.dqhl.community.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dqhl.community.R;
import com.dqhl.community.base.BaseActivity;

public class PropertyServiceActivity extends BaseActivity implements View.OnClickListener {

    private ImageView ivTopback;
    private TextView tvTopTitle;
    private TextView tv_repair;//我要报修Activity
    private TextView tv_complain;//我要投诉Activity
    private TextView tv_applianceClear;//家电清洗Activity
    private TextView tv_applianceRepair;//家电维修Activity
    private TextView tv_propertyPay; //物业缴费

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_property_service);
        initView();
    }

    private void initView() {
        ivTopback = (ImageView) findViewById(R.id.iv_top_back);
        ivTopback.setVisibility(View.VISIBLE);
        tvTopTitle = (TextView) findViewById(R.id.tv_top_title);
        tvTopTitle.setText("物业服务");
        tv_repair = (TextView) findViewById(R.id.tv_repair);
        tv_complain = (TextView) findViewById(R.id.tv_complain);
        tv_applianceRepair = (TextView) findViewById(R.id.tv_applianceRepair);
        tv_applianceClear = (TextView) findViewById(R.id.tv_applianceClear);
        tv_propertyPay = (TextView) findViewById(R.id.tv_propertyPay);

        ivTopback.setOnClickListener(this);
        tv_repair.setOnClickListener(this);
        tv_complain.setOnClickListener(this);
        tv_applianceRepair.setOnClickListener(this);
        tv_applianceClear.setOnClickListener(this);
        tv_propertyPay.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_top_back:
                finish();
                break;
            //我要报修
            case R.id.tv_repair:
                overlay(RepairsActivity.class);
                break;
            //我要投诉
            case R.id.tv_complain:
                overlay(ComplainActivity.class);
                break;
            //家电维修
            case R.id.tv_applianceRepair:
                overlay(ApplianceRepairActivity.class);
                break;
            //家电清洗
            case R.id.tv_applianceClear:
                overlay(ApplianceCleanActivity.class);
                break;
            //物业缴费
            case R.id.tv_propertyPay:
                overlay(PropertyPayActivity.class);
                break;
        }
    }
}
